package com.loan.service;

import com.loan.entity.Category;
import com.loan.repository.CategoryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by huxudong on 17/7/1.
 */
@Service
public class CategoryService {

    @Autowired
    private CategoryRepository categoryRepository;

    public List<Category> findByFlag(Integer flag){
        return categoryRepository.findByFlagOrderBySort(flag);
    }
}
